﻿using System.Collections.Generic;
using System.Web.Http;
using Microsoft.Practices.Unity;
using ORISE.Data;
using ORISE.Services.Interfaces;

namespace ORISE.Controllers
{
    public class GroupsController : ApiController
    {
        #region Fields

        private IGroupService groupService; 
        
        #endregion

        #region Dependency Injection

        [Dependency]
        public IGroupService GroupService
        {
            set { groupService = value; }
        } 

        #endregion

        #region Api Methods

        public IEnumerable<Group> GetAllGroups()
        {
            return groupService.GetAllGroups();
        }
        
        #endregion
    }
}
